<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>单位管理</title>
<link rel="stylesheet" href="../../easyui/themes/default/easyui.css"
	type="text/css" media="screen" />
<link rel="stylesheet" href="../../easyui/themes/icon.css"
	type="text/css" media="screen" />
<link rel="stylesheet" href="../../css/main.css" type="text/css"
	media="screen" />
<link rel="stylesheet" type="text/css" href="../../css/Tooltip.css" />
<script src="../../easyui/jquery-1.4.4.min.js"></script>
<script src="../../easyui/jquery.easyui.min.js"></script>
<!-- mytab -->
<script src="../../myjs/myTab.js"></script>
<!-- sys -->
<script src="../../myjs/sys.js"></script>
<script src="../../myjs/unitManager.js"></script>
<script src="../../easyui/easyMask.js"></script>
<script src="../../easyui/easyUI.js"></script>
<script src="../../easyui/easyLayer.js"></script>
<!-- validation -->
<!-- 
<script src="../../validation/jquery.bgiframe.min.js"></script>
<script src="../../validation/easy_validator.pack.js"></script>
 -->
<script>
		var greyLayer ;
		$(function(){
			grid = $('#tt').datagrid({
				url:'/pxglxt/unit/getUnits',
				pagination:true,
				singleSelect:true,
				fit:true,//表格自动填充
				loadMsg:'正在努力为您加载，请稍作等待…',//加载信息
				toolbar:[{
					text:'新增',
					iconCls:'icon-add',
					handler:'newUnit'
				},'-',{
					text:'修改',
					iconCls:'icon-edit',
					handler:'editUnit'
					
				},'-',{
					text:'删除',
					iconCls:'icon-remove',
					handler:'delUnit'
				}]
			});
			//初始化pagination工具开始
			var pagetool = $('#tt').datagrid('getPager');
			pagetool.pagination({				
					beforePageText:'第',
					afterPageText:'页，共{pages}页',
					displayMsg:'显示从 {from} 到  {to} , 总记录 {total} '});
			//初始化pagination工具结束
			$('body').layout();
			$('#btn-save,#btn-cancel').linkbutton();
			win = $('#user-window').window({
				collapsible:false,
				minimizable:false, 
				maximizable:true, 
				closable:true,
				onClose:function(){greyLayer.close();},
				closed:true,
				cache:false	
			});
			form = win.find('form');
			greyLayer = new easyMask(null,'100%','100%',100,'#000',8,true);
		});
		
	</script>
</head>
<body>
<div id="window-center" region="center" fit="true" style="padding: 5px;">
<table id="tt">
	<thead>
		<tr>
			<th field="unit_name" width="100%">学校名称</th>
			<th field="tel_no" width="100%">联系电话</th>
			<th field="fax_no" width="100%">传真机</th>
			<th field="post_no" width="150%">邮编</th>
			<th field="address" width="150%">通信地址</th>
			<th field="url" width="150%">学校网站</th>
			<th field="email" width="100%">Emial</th>
			<th field="bank_name" width="100%">开户银行</th>
			<th field="bank_no" width="100%">银行账号</th>
		</tr>
	</thead>
</table>
</div>
<div id="user-window" title="单位管理窗口"
	style="width: 400px; height: 450px;">
<div style="padding: 20px 20px 40px 80px;">

<form method="post">
<table>
	<tr>
		<td>学校名称：</td>
		<td><input name="unit_name" class="easyui-validatebox" type="text" required="true"></input>
		</td>
	</tr>
	<tr>
		<td>联系电话：</td>
		<td><input name="tel_no" class="easyui-validatebox" type="text" required="true"></input></td>
	</tr>
	<tr>
		<td>传真机：</td>
		<td><input name="fax_no" class="easyui-validatebox" type="text"></input></td>
	</tr>
	<tr>
		<td>邮编：</td>
		<td><input name="post_no" class="easyui-validatebox" type="text"></input></td>
	</tr>
	<tr>
		<td>通信地址：</td>
		<td><input name="address" class="easyui-validatebox" type="text" required="true"></input></td>
	</tr>
	<tr>
		<td>学校网站：</td>
		<td><input name="url" class="easyui-validatebox" type="text"  required="true" validType="url"></input></td>
	</tr>
	<tr>
		<td>Email：</td>
		<td><input name="email" class="easyui-validatebox" type="text"  validType="email"></input></td>
	</tr>
	<tr>
		<td>开户银行：</td>
		<td><input name="bank_name" class="easyui-validatebox" type="text"></input></td>
	</tr>
	<tr>
		<td>银行账号：</td>
		<td><input name="bank_no" class="easyui-validatebox" type="text"></input></td>
	</tr>
</table>
</form>

</div>
<div style="text-align: center; padding: 5px;"><a
	href="javascript:void(0)" onclick="saveUnit()" id="btn-save"
	icon="icon-save">确定</a> <a href="javascript:void(0)"
	onclick="closeWindow()" id="btn-cancel" icon="icon-cancel">取消</a></div>
</div>
</body>
</html>
